home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1999 Spring / macformat-077.iso / Shareware Plus / Development / Akua Sweets 131 / Akua Sweets Examples / Network / Sharing Startup < prev    next >
Encoding:
Text File  |  1999-03-04  |  933 b   |  40 lines  |  [TEXT/ToyS]

  1. property sasShareLoc : {0, 0}
  2.  
  3.  
  4. on run
  5.     set remoteFinder to (choose application with prompt "Choose a remote Finder")
  6.     
  7.     set inf to ¬
  8.         (display info titled ¬
  9.             "Waiting for Sharing" message (remoteFinder as string) ¬
  10.             located at sasShareLoc)
  11.     
  12.     display info inf message ¬
  13.         "Telling Finder to start it up" at line 2
  14.     
  15.     set «class fshr» of remoteFinder to true
  16.     
  17.     set waitSecs to 60
  18.     
  19.     repeat while not («class fshr» of remoteFinder)
  20.         display info inf message ¬
  21.             ("Wait another " & waitSecs & " seconds") at line 2
  22.         pause for 1 with seconds timing
  23.         set waitSecs to waitSecs - 1
  24.         if (waitSecs < 1) then exit repeat
  25.     end repeat
  26.     
  27.     if («class fshr» of remoteFinder) then
  28.         display info inf message ¬
  29.             "It is up!" at line 2
  30.     else
  31.         display info inf message ¬
  32.             "Can't get it up!" at line 2
  33.         beep
  34.     end if
  35.     
  36.     pause for 3 with seconds timing
  37.     
  38.     set sasShareLoc to screen location of ¬
  39.         (display info inf with disposal)
  40. end run